package work04;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException{
        Student st=new Student("小明","男",18);
        System.out.println(st);
        Student st2=new Student("小红","女",20);
        System.out.println(st2);
        Student st3=(Student)st.clone();
        System.out.println(st3);
        //System.out.println(st3.getName().equals(st.getName())&&st3.getSex().equals(st.getSex())&&st3.getAge()== st.getAge());
        if (st3.getName().equals(st.getName())&&st3.getSex().equals(st.getSex())&&st3.getAge()== st.getAge()){
            System.out.println("学生对象:"+st+"和学生对象:"+st3+"是相同的");
        }else {
            System.out.println("学生对象:"+st+"和学生对象:"+st3+"是不同的");
        }
    }




    }

